package com.tongji.housediy.controller.brandCMD
{
	import com.tongji.housediy.events.brandEvent.GetAllBrandEvent;
	import com.tongji.housediy.service.BrandService;
	
	import org.robotlegs.mvcs.Command;
	
	/**
	 * 
	 * @author yanghanbing
	 * 2011/5/06
	 */ 
	public class GetAllBrandsCommand extends Command
	{
		[Inject]
		public var service:BrandService;
		
		[Inject]
		public var event:GetAllBrandEvent;
		
		override public function execute():void
		{
			if(event.type == "getAllBrands")
			service.getBrands();
			else
				service.getBrandXML();
		}
	}
}